import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Detail from './views/newsDetail.vue'
import eventIdList from './views/userBehavior/eventIdList.vue'
import appIdList from './views/userBehavior/appIdList.vue'
import messageList from './views/message/messageList.vue'
import media from './views/media/index.vue'
import tagPush from './views/apppush/tagPush.vue'
import carStyle from './views/carStyle/carStyleSetting.vue'
import carNews from './views/carStyle/carNewsSetting.vue'
import clueList from './views/carStyle/clueList.vue'


import appEnter from './views/app/enter.vue'
import appBottom from './views/app/bottom.vue'
import appMine from './views/app/mine.vue'
import appOther from './views/app/other.vue'
import appAd from './views/app/ad.vue'


let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/detail',
        component: Detail,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: 'APP管理后台',
        iconCls: 'el-icon-menu',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/app/mine', component: appMine, name: '我的页面' },
            { path: '/media/index', component: media, name: '首页自媒体' },
            { path: '/app/bottom', component: appBottom, name: '底部栏' },
            { path: '/app/enter', component: appEnter, name: '入口配置' },
            { path: '/app/ad', component: appAd, name: '广告配置' },
            { path: '/app/other', component: appOther, name: '其他配置' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户行为',
        iconCls: 'el-icon-menu',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/userBehavior/appIdList', component: appIdList, name: '应用id列表' },
            { path: '/userBehavior/eventIdList', component: eventIdList, name: '事件id列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '信息流',
        iconCls: 'el-icon-menu',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/message/list', component: messageList, name: '信息流列表' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '推送',
        iconCls: 'el-icon-menu',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/apppush/tagPush', component: tagPush, name: '根据标签推送' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '爱车',
        iconCls: 'el-icon-menu',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/carStyle/carStyleSetting', component: carStyle, name: '车型配置' },
            { path: '/carStyle/carNewsSetting', component: carNews, name: '车新闻配置'},
            { path: '/carStyle/clueList', component: clueList, name: '线索列表'},
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;